package com.cm.caseManagement.controller;


import com.cm.caseManagement.core.controller.BaseController;
import com.cm.caseManagement.pojo.entity.*;
import com.cm.caseManagement.service.*;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 案件详情Controller
 *
 * @author ruoyi
 * @date 2025-10-12
 */
@RestController
@RequestMapping("/caseManagement/caseDetails")
public class CmCaseDetailsController extends BaseController {

    @Autowired
    private ICmCaseDetailsService cmCaseDetailsService;
    @Autowired
    private ICmCaseService cmCaseService;
    @Autowired
    private ICmBeforeLitigationService cmBeforeLitigationService;
    @Autowired
    private ICmLitigationService cmLitigationService;
    @Autowired
    private ICmConvictedNotExecutedService cmConvictedNotExecutedService;
    @Autowired
    private ICmExecuteService cmExecuteService;
    /**
     * 获取案件信息
     */
//    @ApiOperation("获取案件信息")
    @GetMapping("/getCaseInfo")
    public CmCase getCaseInfo(Long caseId) {
        return cmCaseService.selectCmCaseById(caseId);
    }

    /**
     * 获取案件阶段详情
     */
//    @ApiOperation("获取案件阶段详情")
    @GetMapping("/getCaseStageInfo")
    public String[] getCaseStageInfo(Long caseId) {
        return cmCaseDetailsService.getCaseStageById(caseId);
    }

    /**
     * 获取案件诉前阶段详情
     */
//    @ApiOperation("获取案件诉前阶段详情")
    @GetMapping("/getCaseBeforeInfo")
    public CmBeforeLitigation getCaseBeforeInfo(Long caseId) {
        return cmBeforeLitigationService.selectCmBeforeLitigationByCaseId(caseId);
    }

    /**
     * 获取案件诉讼阶段详情
     */
//    @ApiOperation("获取案件诉讼阶段详情")
    @GetMapping("/getCaseLitigationInfo")
    public CmLitigation getCaseLitigationInfo(Long caseId) {
        return cmLitigationService.selectCmLitigationByCaseId(caseId);
    }

    /**
     * 获取案件已判未执行阶段信息
     */
//    @ApiOperation("获取案件已判未执行阶段信息")
    @GetMapping("/getCmConvictedNotExecuted")
    public CmConvictedNotExecuted getCmConvictedNotExecuted(Long caseId) {
        return cmConvictedNotExecutedService.selectCmConvictedNotExecutedByCaseId(caseId);
    }

    /**
     * 获取案件执行阶段详情
     */
//    @ApiOperation("获取案件执行阶段详情")
    @GetMapping("/getCmExecuteInfo")
    public CmExecute getCmExecuteInfo(Long caseId) {
        return cmExecuteService.selectCmExecuteByCaseId(caseId);
    }
}
